﻿@model NewsItemListModel
@using Nop.Web;
@using Nop.Web.Extensions;
@using Nop.Web.Models.News;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.NewsArchive").Text);
}
<div class="newslist">
    <div class="page-title">
        <div class="title">
            <h1>@T("News")</h1>
        </div>
        <div class="rss">
            <a href="@Url.RouteUrl("NewsRSS", new { languageId = Model.WorkingLanguageId })">
                <img title="@T("News.RSS.Hint")" src="@Url.Content("~/content/images/icon_rss.gif")" alt="@T("News.RSS")" /></a>
        </div>
    </div>
    <div class="clear">
    </div>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = "newslist_page_before_items" })
    <div class="newsitems">
        @foreach (var item in Model.NewsItems)
        {
            <div class="item">
                <a class="newstitle" href="@Url.RouteUrl("NewsItem", new { newsItemId = item.Id, SeName = item.SeName })">
                    @item.Title</a> <span class="newsdate">-
                        @item.CreatedOn.ToString("D")
                    </span>
                <div class="newsdetails">
                    @Html.Raw(item.Short)
                </div>
                <a href="@Url.RouteUrl("NewsItem", new { newsItemId = item.Id, SeName = item.SeName })" class="readmore">
                    @T("News.MoreInfo")</a>
                @Html.Action("WidgetsByZone", "Widget", new { widgetZone = "newslist_page_inside_item" })
            </div>
        }
    </div>
    <div class="pager">
        @Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber")
    </div>
    @Html.Action("WidgetsByZone", "Widget", new { widgetZone = "newslist_page_after_items" })
</div>
